Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Endpoints to get a list of assets which overlap a point, box, or quadkey #351

Merged
merged 10 commits into from
Aug 6, 2021

Conversation

mackdelany
Copy link
Contributor

Background for this PR can be found here: #350

This PR adds three new endpoints to Titiler:

http://<titiler-host>/mosaicjson/{minx},{miny},{maxx},{maxy}/assets
http://<titiler-host>/mosaicjson/{lon},{lat}/assets
http://<titiler-host>/mosaicjson/{quadkey}/assets

Each endpoint returns a list of cogs which overlap the geometries given, e.g:

[
      "s3://super-awesome-cog-1.tif",
      "s3://super-awesome-cog-2.tif",
      "s3://super-awesome-cog-3.tif"
]

Re: mercantile
I believe this PR adds mercantile as a dependency, I am happy to change this if desired! I'm used to mercantile + saw it used in some of the notebooks (so I assumed it might be ok to use). If we'd like to remove mercantile as a dependency I can do one of the following:

And of course - happy to make any other changes / edits desired

for asset_list in [mosaic.assets_for_tile(*t) for t in tiles]
for asset in asset_list
}
)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@vincentsarago
Copy link
Member

thanks @mackdelany everything looks good to me 🙏

I believe this PR adds mercantile as a dependency, I am happy to change this if desired! I'm used to mercantile + saw it used in some of the notebooks (so I assumed it might be ok to use).

mercantile is already a dependency for cogeo-mosaic so this is totally fine. The major blocker for us to remove it, is to add quadkey method to morecantile (developmentseed/morecantile#19).

@vincentsarago
Copy link
Member

@mackdelany Before we merge this PR here is what we need:

@mackdelany
Copy link
Contributor Author

Great, thanks @vincentsarago 👌 🥳

I've updated the changelog, docs and titiler.mosaic requirement.

Let me if any changes are needed / anything else you need from me!

CHANGES.md Outdated Show resolved Hide resolved
CHANGES.md Outdated Show resolved Hide resolved
@vincentsarago
Copy link
Member

🙏 thanks @mackdelany, everything is perfect

@vincentsarago vincentsarago merged commit c4e3200 into developmentseed:master Aug 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants